package Java.BlackHorse.Thread.ThreadMethod5;

public class ThreadDemo {
    /*
    * public final join 插入\插队 线程
    * */
    public static void main(String[] args) throws InterruptedException {
        MyThread mt1 = new MyThread("Thread 1");
        mt1.start();
        /*
        * 将这个线程插入到当前线程之前
        * 这个线程：mt1
        * 当前线程： main
        * */
        mt1.join();
        for(int i=0; i<=10; i++){
            System.out.println(Thread.currentThread().getName()+"  "+i);
        }


    }
}
